<%--
  Created by IntelliJ IDEA.
  User: Administrator
  Date: 2020/2/12
  Time: 19:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%
String path = request.getContextPath();String basePath = request.getScheme()+"://" +request.getServerName()+":" +request.getServerPort();

%>
<html>
<head>
    <base href="<%=basePath%>">
    <title>Title</title>
<script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
<script type="text/javascript">
function  login() {
    $.ajax({
        type:"post",
        url:"user/login",
        data:{"username":"aaaaa"},
        dataType: 'text',
        success:function (data) {
            $("#msg").empty();
            $("#msg").append(data);
        }
    });
}
</script>
</head>


<body>
  <from action="">
      <input type ="button" value="登录成功" onclick="login()">
      <div id="msg"></div>

  </from>

</body>
</html>
